# $Id$
# Maintainer: AndyRTR <andyrtr@archlinux.org>

pkgname=libabw
pkgver=0.1.1
pkgrel=2
pkgdesc="a library that parses the file format of AbiWord documents"
arch=('i686' 'x86_64')
url="https://wiki.documentfoundation.org/DLP/Libraries/libabw"
license=('MPL')
depends=('librevenge' 'libxml2' )
makedepends=('doxygen' 'gperf' 'boost')
source=(https://dev-www.libreoffice.org/src/$pkgname/$pkgname-$pkgver.tar.xz
	libabw-boost-1.59.patch::"https://github.com/LibreOffice/libabw/commit/ee2d0729.patch")
md5sums=('6be55a46078b593ec20cad9bb8730c3e'
         '04ff06433764bac16632d00348d7bfae')

prepare() {
  cd $pkgname-$pkgver
# Fix build with Boost 1.59
  patch -p1 -i ../libabw-boost-1.59.patch
  autoreconf -vi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

check() {
  cd $pkgname-$pkgver
  make -k check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
